<%@ page import="java.util.*,com.db.tracker.vo.*,java.util.*,com.db.tracker.util.*,java.text.*,java.io.*,com.release.bean.*" %>
<%	
		String usergroupname = (String)session.getAttribute("USER_GROUP_NAME"); 
		DBUtil dbutil = new DBUtil();
		String userid = (String)session.getAttribute("USER_ID")==null?"":(String)session.getAttribute("USER_ID");
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> Software</title>

<script>

function UpdateData()
{
	alert(document.treelist.CudId.value);
}


function insertpath(indId)
	{
		//document.treelist.objectName.value=indId;
		var repostr = document.getElementById("repo").value;
		var real =indId.replace(repostr+"/","");
		alert(real);
		document.treelist.objectName.value=real;

	}

function AddReleaseObj()
		 {
			  
			
				var Dbname = document.getElementById("DbName").value;
				var repostr = document.getElementById("repo").value;
				var filepath =document.getElementById("objectName").value
				document.treelist.action="../AddReleaseObj?DbName="+Dbname+"&Repo="+repostr+"&Filepath="+filepath;
				document.treelist.submit();
			
		 }

function Deploy()
		 {
			  
			
				var Dbname = document.getElementById("DbName").value;
				var repostr = document.getElementById("repo").value;
				var filepath =document.getElementById("objectName").value
				var url = "../DepolyServelt?DbName="+Dbname+"&Repo="+repostr+"&Filepath="+filepath;
				alert(url);
				sendRequest(url);
		 }


function getRequestObject() {
  if (window.ActiveXObject) {
    return(new ActiveXObject("Microsoft.XMLHTTP"));
  } else if (window.XMLHttpRequest) {
    return(new XMLHttpRequest());
  } else {
    return(null);
  }
}


function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}





function sendRequest(address) {
  xmlHttp = GetXmlHttpObject();
  xmlHttp.onreadystatechange = showResponseText;
  xmlHttp.open("GET", address, true);
  xmlHttp.send(null);
}


function showResponseText() {
  if ((xmlHttp.readyState == 4) &&
      (xmlHttp.status == 200)) {


               alert("Depolyed");
               
       }


}

function openZoomPopUp(obj){
  var ExURL = "../FileListServlet";
 // ExHandle = window.open(ExURL,"FileList","status=1,scrollbars=1,width=1000,height=300","resize=yes","screenX=130","screenY=10");
  ExHandle = window.open(ExURL,"FileList","width=1000,height=300","resize=yes","screenX=130","screenY=10");
}


</script>

<style type="text/css">
<!--
body {
	background-image: url(../images/bg/pagebg.gif);
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style2 {font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
}
-->
</style>
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<link href="joju.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style4 {color: #FFFFFF}
-->
</style>
</head>

<body onload="MM_preloadImages('../images/menu2_01.jpg','../images/menu2_02.jpg','../images/menu2_03.jpg','../images/menu2_04.jpg','../images/menu2_05.jpg','../images/menu2_06.jpg','../images/menu2_07.jpg ','../images/menu2_08.jpg')">
<center>
<form name="treelist"  method="POST">
  <table id="Table_01" width="1002" height="889" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td height="101" align="left" valign="top"><img src="../images/index_01.jpg" width="1002" height="101" alt="" /></td>
    </tr>
    <tr>
      <td height="46" align="left" valign="top"><table id="Table_3" width="1002" height="46" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td><a href="home.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image22','','../images/menu2_01.jpg',1)"><img src="../images/menu_01.jpg" alt="home" name="Image22" width="82" height="46" border="0" id="Image22" /></a></td>
            <td><a href="tracker.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image23','','../images/menu2_02.jpg',1)"><img src="../images/menu_02.jpg" alt="tracker" name="Image23" width="83" height="46" border="0" id="Image23" /></a></td>
            <td><a href="documents.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image24','','../images/menu2_03.jpg',1)"><img src="../images/menu_03.jpg" alt="documents" name="Image24" width="83" height="46" border="0" id="Image24" /></a></td>
            <td><a href="sourcecode.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image25','','../images/menu2_04.jpg',1)"><img src="../images/menu_04.jpg" alt="source code" name="Image25" width="83" height="46" border="0" id="Image25" /></a></td>
            <td><a href="discussions.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image26','','../images/menu2_05.jpg',1)"><img src="../images/menu_05.jpg" alt="discussions" name="Image26" width="83" height="46" border="0" id="Image26" /></a></td>
            <td><a href="filerelease.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image27','','../images/menu2_06.jpg',1)"><img src="../images/menu_06.jpg" alt="File Release" name="Image27" width="83" height="46" border="0" id="Image27" /></a></td>
            <td><a href="wiki.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image28','','../images/menu2_07.jpg ',1)"><img src="../images/menu_07.jpg" alt="wiki" name="Image28" width="83" height="46" border="0" id="Image28" /></a></td>
            <td><a href="buldandtest.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image29','','../images/menu2_08.jpg',1)"><img src="../images/menu_08.jpg" alt="build and test" name="Image29" width="84" height="46" border="0" id="Image29" /></a></td>
            <td><img src="../images/menu_09.jpg" width="333" height="46" alt="" /></td>
            <td><img src="../images/menu_10.jpg" width="5" height="46" alt="" /></td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td height="742" align="left" valign="top"><table id="Table_" width="1002" height="742" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="2" bgcolor="#A1C0DF"><img src="../images/content_01.jpg" width="226" height="1" alt="" /></td>
            <td><img src="../images/content_02.jpg" width="776" height="1" alt="" /></td>
          </tr>
          <tr>
            <td height="721" valign="top" bgcolor="#FFFFFF">&nbsp;
			<%@ include file='Test3.jsp' %>
			</td>
            <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="721" colspan="5" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td colspan="2" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="3%" bgcolor="#FFFFFF">&nbsp;</td>
                          <td width="97%" background="../images/tools_11.jpg"><table id="Table_4" width="692" height="25" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                              <td><img src="../images/tools_01.jpg" width="60" height="25" alt="" onClick="AddReleaseObj()"/></td>
                              <td><img src="../images/tools_02.jpg" width="1" height="25" alt="" /></td>
                              <td><img src="../images/tools_03.jpg" width="46" height="25" alt="" /></td>
                              <td><img src="../images/tools_04.jpg" width="70" height="25" alt="" onClick="Deploy()"/></td>
                              <td><img src="../images/tools_05.jpg" width="1" height="25" alt="" /></td>
                              <td>&nbsp;</td>
                              <td><span class="marginscontact">
                                <select name="DbName" size="1" id="DbName">
                                  <% 															
											Vector relDbNameVector = dbutil.getDBList();
											for(int i=0;i<relDbNameVector.size();i++)
											{
												DBBean dbbean =(DBBean)relDbNameVector.elementAt(i); 
										%>
			
												<option value= '<%=	dbbean.getDbname()%>'>
												<%= dbbean.getDbname()%> 
												</option>
							
										<%	}
										%>
                                </select>
                              </span></td>
                              <td>&nbsp;</td>
                              <td><span class="marginscontact">
                                <select name="repo" size="1" id="repo">
                                 <% 
									ArrayList  branchlist = dbutil.getBranchlist();
									Iterator itr = branchlist.iterator(); 
									while(itr.hasNext()) {
									FileList fileobj = (FileList)itr.next(); 
									%>				
									<option value= '<%=	fileobj.getPath()%>'>
									<%= fileobj.getName()%> 
									</option>
									
									<%	} %>

                                </select>
                              </span></td>
                              <td>&nbsp;</td>
                              <td><img src="../images/tools_11.jpg" width="354" height="25" alt="" /></td>
                            </tr>
                          </table></td>
                        </tr>
                      </table></td>
                      </tr>
                    <tr>
                      <td width="3%">&nbsp;</td>
                      <td width="97%"><table id="Table_2" width="736" height="251" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td width="11"><img src="../images/login_01.jpg" width="11" height="11" alt="" /></td>
                          <td width="713" background="../images/login_02.jpg"><img src="../images/login_02.jpg" width="384" height="11" alt="" /></td>
                          <td width="12"><img src="../images/login_03.jpg" width="12" height="11" alt="" /></td>
                        </tr>
                        <tr>
                          <td background="../images/login_02.jpg"><img src="../images/login_04.jpg" width="11" height="224" alt="" /></td>
                          <td align="left" valign="top" background="../images/bg/loginbg.jpg"><table cellspacing="0" cellpadding="0" width="95%" 
                          border="0">
                            <tbody>
                              <tr class="style2">
                                <td class="marginscontact"><span class="contentbold1">Release Object- Basic Details<br />
                                  <br />
                                </span></td>
                                <td class="marginscontact">&nbsp;</td>
                                <td colspan="6" class="marginscontact">&nbsp;</td>
                              </tr>
                              <tr class="style2">
                                <td class="marginscontact" width="28%"><div align="right"><span class="normalcontent"><span class="content">Release Name</span> <span 
                              class="photo_name">:</span></span></div></td>
                                <td class="marginscontact" width="2%">&nbsp;</td>
                                <td colspan="6" class="marginscontact">
								
								<select name=releaseName id ='releaseName'  >					
										<% 															
											Vector relNameVector = dbutil.getReleaseName();
											for(int i=0;i<relNameVector.size();i++)
											{
												ReleaseVO relbean =(ReleaseVO)relNameVector.elementAt(i); 
										%>
			
												<option value= '<%=	relbean.getReleaseName()%>'>
												<%= relbean.getReleaseName()%> 
												</option>
							
										<%	}
										%>
								</select>
							  
							  </tr>
                              <tr class="style2">
                                <td class="marginscontact"><div align="right"><span class="content">Object's DB Name</span> <span 
                              class="mandatory">:</span></div></td>
                                <td class="marginscontact">&nbsp;</td>
                                <td colspan="6" class="marginscontact">
								
									<select name='dBType' id ='dBType'>
												<% 
													Vector dbVector = dbutil.getDbNameVO();
													for(int i=0;i<dbVector.size();i++)
													{
														DbNameVo dbvo =(DbNameVo)dbVector.elementAt(i); 
												%>

														<option value= '<%=	dbvo.getDBName()%>'>
															<%= dbvo.getDBName()%> 
														</option>
									
												<%	}
												%>
									</select>
								
								</td>
                              </tr>
                              <tr class="style2">
                                <td class="marginscontact"><div align="right"><span class="content">Object's Type</span>:</div></td>
                                <td class="marginscontact">&nbsp;</td>
                                <td colspan="6" class="marginscontact">
										<select name="objectType" id="objectType" >
														<option value='0' >Select Object Type</option>
														<% 
															Vector objType = dbutil.getObjTypeVO();
															
															if(objType!=null && objType.size()>0){
															for(int i=0;i<objType.size();i++)
															{
																ObjectTypeVO objvo =(ObjectTypeVO)objType.elementAt(i); 
														%>

																<option value= '<%=objvo.getObjType()%>' > 
																	<%= objvo.getObjType()%> </option>
											
														<%	} }
														%>
										</select>
								
								
								</td>
                              </tr>
                              <tr class="style2">
                                <td class="marginscontact"><div align="right">Object Name :</div></td>
                                <td class="marginscontact">&nbsp;</td>
                                <td width="31%" class="marginscontact">
								<input type="text" class="box" id ="objectName" name="objectName" size="31" >
								</td>
                                <td width="2%" class="marginscontact">&nbsp;</td>
                                <td width="5%" class="marginscontact"><img src="../images/checkout.gif" width="16" height="16" onClick ="openZoomPopUp(this)" /></td>
                                <td width="16%" class="marginscontact"><img src="../images/file_obj.gif" width="16" height="16" /></td>
                                <td width="4%" colspan="-5" class="marginscontact">&nbsp;</td>
                                <td width="12%" colspan="-5" class="marginscontact">&nbsp;</td>
                              </tr>
                              <tr>
                                <td valign="top" class="content"><div align="right">User Updated :</div></td>
                                <td valign="top" class="marginscontact">&nbsp;</td>
                                <td colspan="6" valign="center" class="marginscontact">
								<input type="text" class="box" name="userUpdated" id ="userUpdated" size="31" > 
								</td>
                              </tr>
                              <tr>
                                <td valign="top" class="content"><div align="right">Contact Person's Email:</div></td>
                                <td valign="top" class="marginscontact">&nbsp;</td>
                                <td colspan="6" valign="center" class="marginscontact">
								<input type="text"  class="box" name="contactPerson" id="contactPerson" size="31" > </td>
                              </tr>
                              <tr>
                                <td valign="top" class="content">&nbsp;</td>
                                <td valign="top" class="marginscontact">&nbsp;</td>
                                <td colspan="6" valign="center" class="marginscontact"><input type="Button" name="" value="     Update"  onClick ="SaveCustomer()"/></td>
                              </tr>
							  <input type="hidden" name="CudId" id ="CudId" value='0'>
                            </tbody>
                          </table></td>
                          <td background="../images/login_06.jpg"><img src="../images/login_06.jpg" width="12" height="224" alt="" /></td>
                        </tr>
                        <tr>
                          <td><img src="../images/login_07.jpg" width="11" height="16" alt="" /></td>
                          <td background="../images/login_08.jpg" bgcolor="#F3F7FA"><img src="../images/login_08.jpg" width="384" height="16" alt="" /></td>
                          <td><img src="../images/login_09.jpg" width="12" height="16" alt="" /></td>
                        </tr>
                      </table></td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td valign="top"><table id="Table_5" width="736" height="251" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td width="11"><img src="../images/login_01.jpg" width="11" height="11" alt="" /></td>
                          <td width="713" background="../images/login_02.jpg"><img src="../images/login_02.jpg" width="384" height="11" alt="" /></td>
                          <td width="12"><img src="../images/login_03.jpg" width="12" height="11" alt="" /></td>
                        </tr>
                        <tr>
                          <td height="224" background="../images/login_04.jpg"><img src="../images/login_04.jpg" width="11" height="224" alt="" /></td>
                          <td align="left" valign="top" background="../images/bg/loginbg.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td height="19" valign="top"><form id="form1" name="form1" method="post" action="">
                                <label>
                                <textarea name="textarea" id="textarea" cols="86" rows="10"></textarea>
                                </label>
                              </form>                              </td>
                            </tr>
                          </table></td>
                          <td background="../images/login_06.jpg"><img src="../images/login_06.jpg" width="12" height="224" alt="" /></td>
                        </tr>
                        <tr>
                          <td><img src="../images/login_07.jpg" width="11" height="16" alt="" /></td>
                          <td background="../images/login_08.jpg" bgcolor="#F3F7FA"><img src="../images/login_08.jpg" width="384" height="16" alt="" /></td>
                          <td><img src="../images/login_09.jpg" width="12" height="16" alt="" /></td>
                        </tr>
                      </table></td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                  </table>
                    <br /></td>
                </tr>
                
            </table></td>
          </tr>
          <tr>
            <td height="19" colspan="2" valign="top" bgcolor="#CCCCCC"><span class="contentwhitesatheesh">&copy;2010 Joju's Software. All rights reserved.</span></td>
          </tr>
      </table></td>
    </tr>
  </table>
</center>
</form>

</body>
</html>
